<template>
	<view class="page_main">
		<pagelogin ref="pagelogin" @loginready="back_page" :p_model="p_model"></pagelogin>
	</view>
</template>

<script>
export default {
	data() {
		return {
			p_model: 'wechat_login',
		};
	},
	onShow() {},
	onLoad(v) {
		this.p_model = v.type || 'wechat_login';
		// if (v.type) {
		// 	this.$refs.pagelogin.call_chang_model(v.type);
		// }
	},
	methods: {
		back_page() {
			// 登录成功回调
			let _this = this;
			let url = uni.getStorageSync('login_to_url');
			if (url) {
				uni.removeStorageSync('login_to_url');
				_this.com_page_back(1, url);
			} else {
				_this.com_page_back();
			}
		},
	},
	watch: {},
};
</script>

<style lang="scss"></style>
